@charset "utf-8";

.btn {
    display: inline-block;
    height: 38px;
    line-height: 38px;
    padding: 0 18px;
    background-color: #009688;
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
    text-align: center;
    border: none;
    border-radius: 2px;
    outline: 0;
    cursor: pointer;
    vertical-align: middle;
    box-sizing: border-box;
    user-select: none;
    transition: all 0.3s;

    &:hover {
        opacity: 0.8;
    }
    &.btn-disabled:hover {
        cursor: not-allowed;
    }

    &+.btn {
        margin-left: 10px;
    }
}

.btnBg(@class, @background-color, @border, @color, @background-hover, @border-hover, @color-hover) {
    .btn-@{class} {
        background-color: @background-color;
        border: 1px solid @border;
        color: @color;

        &:hover {
            background-color: @background-hover;
            border-color: @border-hover;
            color: @color-hover;
        }
    }
}
.btnBg(
    @class: primary,
    @background-color: #fff,
    @border: #c9c9c9,
    @color: #666,
    @background-hover: #fff,
    @border-hover: #c9c9c9,
    @color-hover: #333
);
.btnBg(
    @class: normal,
    @background-color: #1e9fff,
    @border: #1e9fff,
    @color: #fff,
    @background-hover: #1e9fff,
    @border-hover: #1e9fff,
    @color-hover: #fff
);
.btnBg(
    @class: warm,
    @background-color: #ffb800,
    @border: #ffb800,
    @color: #fff,
    @background-hover: #ffb800,
    @border-hover: #ffb800,
    @color-hover: #fff
);
.btnBg(
    @class: danger,
    @background-color: #ff5722,
    @border: #ff5722,
    @color: #fff,
    @background-hover: #ff5722,
    @border-hover: #ff5722,
    @color-hover: #fff
);
.btnBg(
    @class: disabled,
    @background-color: transparent,
    @border: rgba(255, 255, 255, 0.5),
    @color: #fff,
    @background-hover: transparent,
    @border-hover: rgba(255, 255, 255, 0.5),
    @color-hover: rgba(255, 255, 255, 1),
);
.btnBg(
    @class: light,
    @background-color: rgba(255, 255, 255, 0.14),
    @border: rgba(255, 255, 255, 0.24),
    @color: #fff,
    @background-hover: rgba(255, 255, 255, 0),
    @border-hover: rgba(255, 255, 255, 0.54),
    @color-hover: #fff,
);

.btnSize(@class, @height, @padding, @fz: 12px) {
    .btn-@{class} {
        height: @height;
        line-height: @height;
        padding: 0 @padding;
        font-size: @fz;
    }
}
.btnSize(@class: lg, @height: 44px, @padding: 25px, @fz: 16px);
.btnSize(@class: sm, @height: 30px, @padding: 10px);
.btnSize(@class: xs, @height: 20px, @padding: 5px);

.btn-radius {
    border-radius: 100px;
}
